package com.wxmit.framework.quartz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wxmit.framework.quartz.exception.TaskException;
import com.wxmit.framework.quartz.domain.SysJob;
import com.wxmit.system.base.core.IShushanService;
import com.wxmit.system.base.core.ShushanPage;
import org.quartz.SchedulerException;

import java.util.List;

/**
 * 定时任务调度Service接口
 * 
 * @author xiong
 * @date 2022-08-11
 */
public interface ISysJobService extends IShushanService<SysJob>
{

   IPage<SysJob> listPage(ShushanPage<SysJob> page, SysJob searchData);


    Object changeStatus(Long id, String status) throws SchedulerException;

    void executeOnce(Long id) throws SchedulerException;

    Object insertJob(SysJob sysJob) throws TaskException, SchedulerException;

    Object updateJobById(SysJob sysJob) throws TaskException, SchedulerException;

    Object removeJobByIds(List<Long> jobIds) throws SchedulerException;
}